import request from '@/utils/request'
import type {categorySelectModel} from '@/api/product/model/categorySelect'
//枚举定义接口
enum Api {
    getCategory1ListApi = '/admin/product/getCategory1',
    getCategory2ListApi = '/admin/product/getCategory2',
    getCategory3ListApi = '/admin/product/getCategory3',


}
//获取一级分类数据
export const reqGetCategory1ListData = ()=>{
    return request.get<any, categorySelectModel>(Api.getCategory1ListApi)
}
//获取2级
export const reqGetCategory2ListData = (category1Id:number)=>{
    return request.get<any, categorySelectModel>(`${Api.getCategory2ListApi}/${category1Id}`)
}
//获取3级
export const reqGetCategory3ListData = (category2Id:number)=>{
    return request.get<any, categorySelectModel>(`${Api.getCategory3ListApi}/${category2Id}`)
}